#include <stdio.h>
#include <math.h>
#include <stdlib.h>

void foo(int a,int b)
{
  printf("foo funtion the %d,%d\n",a,b);
}
  

int main(int argc,char **argv)
{
  int a,b;
  a = 1,b = 2;
  int c = 10;
  asm("xchg %%eax,%%ebx;"
      :"=a"(a),"=b"(b)
      :"a"(a),"b"(b));


  printf("%d,%d\n",a,b);
  asm("push %%ebx;"
      "push %%eax;"
      "call foo;"
      "pop %%eax;"
      "pop %%ebx;"
      :
      :"a"(a),"b"(b));

  asm("incl %1"
      :"=a"(c) 
      :"0"(c),"im"(c));
  printf("c = %d\n",c);
  printf("foo =  %x", foo);

  return 0;
}
